﻿using Entity;
using Entity.Permissionss;
using Entity.RolePermissionss;
using Entity.UserPermissionss;
using Entity.UserRoles;
using EntityFrameWorkCore;
using ShardingCore.Core.ShardingConfigurations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FrameWorkCore.EFCore
{
    internal static class RouteConfig
    {
        public static void ShardingRouteConfig(this ShardingEntityConfigOptions<DefaultDbContext> option)
        {

            option.AddShardingDataSourceRoute<UserSplitDataSourceRoute>();
            option.AddShardingDataSourceRoute<RoleSplitDataSourceRoute>();
            option.AddShardingDataSourceRoute<UserRoleSplitDataSourceRoute>();
            option.AddShardingDataSourceRoute<UserPermissionsSplitDataSourceRoute>();
            option.AddShardingDataSourceRoute<RolePermissionsSplitDataSourceRoute>();
            option.AddShardingDataSourceRoute<PermissionsSplitDataSourceRoute>();

        }

    }
}
